package com.ww.gss.vo.param;

import java.sql.Date;
import java.util.HashMap;
import java.util.Map;

import com.ww.gss.util.DateUtils;

public class DBOpsParam {
	private String moduleName;
	private String actionName;
	private Map paramMap;

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((actionName == null) ? 0 : actionName.hashCode());
		result = prime * result + ((moduleName == null) ? 0 : moduleName.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		DBOpsParam other = (DBOpsParam) obj;
		if (actionName == null) {
			if (other.actionName != null)
				return false;
		} else if (!actionName.equals(other.actionName))
			return false;
		if (moduleName == null) {
			if (other.moduleName != null)
				return false;
		} else if (!moduleName.equals(other.moduleName))
			return false;
		return true;
	}

	public String getModuleName() {
		return moduleName;
	}

	public void setModuleName(String moduleName) {
		this.moduleName = moduleName;
	}

	public String getActionName() {
		return actionName;
	}

	public void setActionName(String actionName) {
		this.actionName = actionName;
	}

	public Map getParamMap() {
		if (paramMap == null) {
			paramMap = new HashMap();
		}
		paramMap.put("mem", "");
		paramMap.put("urCreate", "btmuapplication");
		paramMap.put("dateCreate",DateUtils.getCurrentDate());
		paramMap.put("urAlter", "btmu");
		paramMap.put("dateAlter",DateUtils.getCurrentDate());

		return paramMap;
	}

	public void setParamMap(Map paramMap) {
		
		this.paramMap = paramMap;
	}

}
